package com.woniu.order.feign;

import com.woniu.common.dto.UserDTO;
import com.woniu.common.entity.Addr;
import com.woniu.common.entity.AddrDto;
import com.woniu.common.utils.ResponseData;
import com.woniu.order.dto.AddrDTO;
import com.woniu.order.dto.CustomDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "custom-server")
public interface UserFeign {
    @GetMapping("/queryUserById")
    ResponseData<UserDTO> queryUserById(@RequestParam("id") String id);

    @GetMapping("/custom/queryCustomByUserId")
    ResponseData<CustomDTO> queryCustomByUserId(@RequestParam("userId") String userId);

    @GetMapping("/queryAddrById")
    ResponseData<AddrDTO> queryAddrById(@RequestParam("addressId") String addressId);
    @PostMapping("/selectAddr")
    Addr selectAddr(@RequestBody String addressId);


    //售后退款时，给zyUser表中的用户账户余额加钱
    @PostMapping("/UpdateUser")
    public ResponseData<?> UpdateUser(@RequestBody UserDTO userDTO);

    /**
     * 添加售后表时查订单详情的地址
     */




    @GetMapping("/chat/QueryHuihuaList")
    List<Integer> QueryHuihuaList();
}
